package com.shenjies88.practice.baseframework.tools;

import lombok.extern.slf4j.Slf4j;
import org.springframework.ai.tool.annotation.Tool;
import org.springframework.ai.tool.annotation.ToolParam;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * @author by shenjies88
 * @since 2025/9/26 星期五 11:52
 */
@Slf4j
@Component
public class UserTools {

    @Tool(description = "根据用户id获取用户名称")
    public String getUserNameByUserId(@ToolParam(description = "用户id") Long userId) {
        log.info("getUserNameByUserId {}", userId);
        return UUID.randomUUID().toString() + "_" + userId;
    }
}
